package org.db2.project.airline.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import java.io.Serializable;
import java.math.BigDecimal;


/**
 * The persistent class for the FLIGHTCLASSPRICE database table.
 */
@Entity
public class FlightClassPrice implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @SequenceGenerator(name = "FLIGHTCLASSPRICE_ID_GENERATOR", sequenceName = "FLIGHTCLASSPRICE_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "FLIGHTCLASSPRICE_ID_GENERATOR")
    private long id;

    private BigDecimal price;

    //bi-directional many-to-one association to FlightClass
    @ManyToOne
    @JoinColumn(name = "CLASSID")
    private FlightClass flightClass;

    //bi-directional many-to-one association to FlightPlan
    @ManyToOne
    @JoinColumn(name = "FLIGHTPLANID")
    private FlightPlan flightPlan;

    public FlightClassPrice() {
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public BigDecimal getPrice() {
        return this.price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public FlightClass getFlightClass() {
        return this.flightClass;
    }

    public void setFlightClass(FlightClass flightClass) {
        this.flightClass = flightClass;
    }

    public FlightPlan getFlightPlan() {
        return this.flightPlan;
    }

    public void setFlightPlan(FlightPlan flightPlan) {
        this.flightPlan = flightPlan;
    }

}